package com.xiaoshuidi.cloud.module.contract.controller.admin.roommate.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.xiaoshuidi.cloud.module.contract.convert.excel.GenderConverter;
import com.xiaoshuidi.cloud.module.contract.convert.excel.IdTypeConverter;
import com.xiaoshuidi.cloud.module.contract.convert.excel.YseOrNoConverter;
import com.xiaoshuidi.cloud.module.contract.valid.ExcelValid;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 企业同住人 Excel 导入 VO
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = false) // 设置 chain = false，避免用户导入有问题
public class ContractRoommateImportExcelVO {

    @ExcelProperty("房间编号")
    @ExcelValid(message = "房间id不能为空")
    private Long roomId;

    @ExcelProperty("房源")
    private String fullRoomName;

    @ExcelProperty("租客名")
    @ExcelValid(message = "租客名不能为空")
    private String roommateName;

    @ExcelProperty("同住人手机号")
    @ExcelValid(message = "同住人手机号不能为空")
    private String roommatePhone;
    /**
     * 证件类型  IdentityCard 身份证 | Passport 护照 |TaiwaneseId 台胞证 |HKAndMCPermit 港澳居民通行证 | MilitaryId 军官证|other 其他,不能为空
     */
    @ExcelProperty(value = "证件类型", converter = IdTypeConverter.class)
    @ExcelValid(message = "证件类型不能为空")
    private Integer roommateIdType;

    @ExcelProperty("证件号码")
    @ExcelValid(message = "证件号码不能为空")
    private String roommateIdNumber;

    @ExcelProperty(value = "性别",converter = GenderConverter.class)
    private Integer roommateGender;

    @ExcelProperty("年龄")
    private Integer roommateAge;

    @ExcelProperty("学历")
    private String roommateEducation;

    @ExcelProperty("职位")
    private String roommatePosition;

    @ExcelProperty("国籍")
    private String nationality;

    @ExcelProperty("关系")
    private String relation;

    @ExcelProperty(value = "是否是寝室长",converter = YseOrNoConverter.class)
    @ExcelValid(message = "是否是寝室长不能为空")
    private Integer roommateType;
}
